/*
 *
 */
package com.white.shm.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.white.shm.core.Response;
import com.white.shm.entity.User;

/**
 *
 *
 * @title UserController.java
 * @date 2019/12/08 23:53
 * @author White
 */
@RestController
@RequestMapping("/user")
public class UserController {

    /** LOGGER */
    private static final Logger LOGGER = LoggerFactory.getLogger(UserController.class);

    /**
     * 用户登录
     *
     * @title login
     * @param request 请求
     * @return java.lang.String
     * @date 2019/12/08 23:57
     * @author White
     */
    @PostMapping("/login")
    public Response login(@RequestBody JSONObject request) {
        LOGGER.info("[login], {}", request);
        User user = new User();
        return new Response();
    }

    /**
     *
     *
     * @title register
     * @param request 请求
     * @return com.white.shm.core.Response
     * @date 2019/12/10 00:03
     * @author White
     */
    @PostMapping("/register")
    public Response register(@RequestBody JSONObject request) {

        return new Response();
    }

    @GetMapping("/get")
    public String test() {
        return "Hello World!";
    }

}
